<?php
use Symfony\Component\HttpFoundation\Request;


$app = Realisation\App::getInstance();

$before = function (Request $request) use ($app) {
    $logger = $app['monolog.api'];
    $logger->debug($request->getRequestUri(), $request->request->all());
};

$app->match('/msg', 'Realisation\Web\Controller\MessageController::get')
        ->method('GET|POST')
        ->before($before);
$app->match('/msg/count', 'Realisation\Web\Controller\MessageController::getCount')
        ->method('GET|POST')
        ->before($before);
$app->match('/site', 'Realisation\Web\Controller\SiteController::get')
        ->method('GET|POST')
        ->before($before);
$app->match('/url', 'Realisation\Web\Controller\UrlController::get')
        ->method('GET|POST')
        ->before($before);

$app->get('/client', 'Realisation\Web\Controller\ClientController::get');

$app->get('/log', 'Realisation\Web\Controller\LogController::request');